RequestPdfDocumentPasswordCallback

The callback is invoked when the frame requests the password for an encrypted PDF document.

Use the password to provide the password for the encrypted PDF document.

Use the showPasswordDialog method to invoke the default PDF viewer password dialog.

Use the cancel method to cancel the request.


browser.set(RequestPdfDocumentPasswordCallback.class, (params, tell) -> {
    if (params.url().endsWith("my-protected-file.pdf")) {
        tell.password("H3NXrfF23");
    }
});

Since

7.27

Inheritors

Types

Link copied to clipboard
public final class Action extends AsyncCallbackAction<R>
An action providing a response to the RequestPdfDocumentPasswordCallback.
Link copied to clipboard
public interface Params
The parameters of the RequestPdfDocumentPasswordCallback.

Functions

Link copied to clipboard
public abstract void on(P params, R tell)
Invoked when the callback needs a response for the given callback parameters.